package org.merka.functioninterpreter.test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.merka.functioninterpreter.parser.Parser;
import org.merka.functioninterpreter.parser.ast.ASTProgramma;

public class Main {

	/**
	 * @param args
	 */
	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		try
		{
			Parser parser = new Parser(System.in);
			String retryInput = "";
			
			do
			{
				ASTProgramma ast = null;
				try
				{
					ast = parser.Programma();
				}
				catch(Throwable t)
				{
					t.printStackTrace();
				}
				
				if(ast != null)
				{
					System.out.println("OK!");
				}
			}
			while(retryInput.equalsIgnoreCase("s"));
		}
		catch(Throwable t)
		{
			t.printStackTrace();
		}
	}
}
